<template>
  <a-list style="background:white" item-layout="horizontal" :data-source="dataSource">
    <a-list-item class="listItem" slot="renderItem" slot-scope="item, index">
        <div>
            <a-button style="color:red" @click="deleteHistory(index)" type="link">X</a-button>
            <b @click="returnData(item.text)">{{item.text}}</b>
        </div>
    </a-list-item>
  </a-list>
</template>

<script>
export default {
    props:{
        dataSource:Array
    },
    methods:{
        deleteHistory(index){
            console.log("test")
            this.dataSource.splice(index,1)
        },
        returnData(text){
            console.log(text)
            return text
        }
    }
};
</script>

<style scoped>
</style>